-
Notifications
You must be signed in to change notification settings - Fork 0
add proper domain #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add proper domain #11
Conversation
9a338a6 to
85d6d43
Compare
Signed-off-by: Misha M.-Kupriyanov <[email protected]>
Signed-off-by: Misha M.-Kupriyanov <[email protected]>
…ice methods Signed-off-by: Misha M.-Kupriyanov <[email protected]>
85d6d43 to
2ee9cd1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the IONOS email account creation flow to separate username from domain. Instead of accepting a full email address, the system now accepts only the username portion and constructs the full email address by appending a configured mail domain extracted from the customer domain setting.
Key changes:
- Extract mail domain from customer domain using Public Suffix List
- Change API parameters from
emailAddresstoemailUser/userName - Remove email validation and extraction logic from IonosMailService
- Update frontend to display domain suffix and collect only username
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/Service/IONOS/IonosConfigService.php | Added getMailDomain() method to extract registrable domain from customer domain using Pdp library |
| lib/Service/IONOS/IonosMailService.php | Refactored createEmailAccount() to accept username instead of email address; removed extractDomain() and extractUsername() helper methods |
| lib/Controller/IonosAccountsController.php | Updated parameter from emailAddress to emailUser; removed email format validation; updated logging to use the constructed email from response |
| lib/Controller/PageController.php | Added IonosConfigService dependency and included mail domain in initial state |
| src/components/ionos/NewEmailAddressTab.vue | Changed input field from email to username; dynamically display domain suffix from preferences; construct full email for validation |
| src/init.js | Added initialization of ionos-mailconfig-domain preference in store |
| tests/Unit/Service/IONOS/IonosConfigServiceTest.php | Added comprehensive tests for getMailDomain() covering various domain formats |
| tests/Unit/Service/IONOS/IonosMailServiceTest.php | Updated all tests to use username instead of email address; removed tests for extraction methods |
| tests/Unit/Controller/IonosAccountsControllerTest.php | Updated tests to use emailUser parameter; removed email format validation test |
| tests/Unit/Controller/PageControllerTest.php | Added IonosConfigService mock and verified mail domain is included in preferences |
Comments suppressed due to low confidence (1)
src/components/ionos/NewEmailAddressTab.vue:1
- [nitpick] Comment updated to 'email user' but should be consistent with terminology used elsewhere. Consider 'Test with empty username' to match the parameter name.
<!--
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $user = $this->userSession->getUser(); | ||
| $response = new TemplateResponse($this->appName, 'index'); | ||
|
|
||
|
|
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary blank lines added. Remove extra blank line to maintain consistent code formatting.
…s parameter Signed-off-by: Misha M.-Kupriyanov <[email protected]>
… domain Signed-off-by: Misha M.-Kupriyanov <[email protected]>
2ee9cd1 to
6d16117
Compare
0b261cf
into
feature/create-ionos-mail
npm run mockof Mk/dev/add mock dev server ionos-mail-configuration-api-client#4.env[email protected]for local tests